package com.itheima.wms.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itheima.pinda.base.entity.Entity;
import com.itheima.pinda.base.entity.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import static com.baomidou.mybatisplus.annotation.SqlCondition.EQUAL;
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 状态记录
 * </p>
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@SuperBuilder
@TableName("wms_status_record")
@ApiModel(value = "StatusRecord", description = "状态记录")
public class StatusRecordEntity extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 业务id
     */
    @ApiModelProperty(value = "业务id")
    @NotNull(message = "业务id不能为空", groups = {Save.class})
    @TableField(value = "business_id")
    private Long businessId;
    /**
     * 业务类型
     */
    @ApiModelProperty(value = "业务类型")
    @NotEmpty(message = "业务类型不能为空", groups = {Save.class})
    @Length(max = 50, message = "业务类型长度不能超过50")
    @TableField(value = "business_type")
    private String businessType;
    /**
     * 业务模型
     */
    @ApiModelProperty(value = "业务模型")
    @NotEmpty(message = "业务模型不能为空", groups = {Save.class})
    @Length(max = 50, message = "业务模型长度不能超过50")
    @TableField(value = "business_model")
    private String businessModel;
    /**
     * 业务状态
     */
    @ApiModelProperty(value = "业务状态")
    @NotEmpty(message = "业务状态不能为空", groups = {Save.class})
    @Length(max = 50, message = "业务状态长度不能超过50")
    @TableField(value = "business_status")
    private String businessStatus;
    /**
     * 业务状态标签
     */
    @ApiModelProperty(value = "业务状态标签")
    @NotEmpty(message = "业务状态标签不能为空", groups = {Save.class})
    @Length(max = 50, message = "业务状态标签长度不能超过50")
    @TableField(value = "business_status_label")
    private String businessStatusLabel;
    /**
     * 发生时间
     */
    @ApiModelProperty(value = "发生时间")
    @TableField(value = "happen_time")
    private java.time.LocalDateTime happenTime;
    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    @TableField(value = "status")
    private Integer status;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Length(max = 255, message = "备注长度不能超过255")
    @TableField(value = "remark")
    private String remark;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Length(max = 50, message = "创建人长度不能超过50")
    @TableField(value = "create_name", fill = FieldFill.INSERT)
    private String createName;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    @Length(max = 50, message = "更新人长度不能超过50")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE)
    private String updateName;
    /**
     * 逻辑删除 0 删除
     */
    @ApiModelProperty(value = "逻辑删除 0 删除")
    @TableField(value = "logic_del")
    private Integer logicDel;
}
